package com.qeeyou.apps.android.craftsman.activity.me;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.qeeyou.apps.android.craftsman.R;

public class WalletActivity extends Activity {

    private ImageView btnBack;
    private TextView txtvMoney;
    private Button btnWithdraw;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_wallet);

        setView();

        setEvent();
    }

    private void setView() {
        btnBack = (ImageView) this.findViewById(R.id.btnBack4Wallet);
        txtvMoney = (TextView) this.findViewById(R.id.txtvMoney4Wallet);
        btnWithdraw = (Button) this.findViewById(R.id.btnWithdraw4Wallet);
    }

    private void setEvent() {
        btnBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                WalletActivity.this.finish();
            }
        });

        btnWithdraw.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(WalletActivity.this, "提现按钮点击事件", Toast.LENGTH_SHORT).show();
                Intent intent = new Intent(WalletActivity.this, WithdrawActivity.class);
                WalletActivity.this.startActivity(intent);
            }
        });
    }
}
